package com.yuexiang.melodyhub.common.handler;

public abstract class AbstractValidationHandler<T> implements ValidationHandler<T> {
    private ValidationHandler<T> next;

    public AbstractValidationHandler<T> setNext(AbstractValidationHandler<T> next) {
        this.next = next;
        return this;
    }

    public void handlerNext(T content) {
        if (next != null) {
            next.handler(content);
        }
    }
}
